class CreateTags < ActiveRecord::Migration
  def self.up
    add_column :articles, :tag_list, :string
    
    create_table :tags do |t|
      t.column "name", :string
    end
    
    create_table :taggings do |t|
      t.column "article_id", :integer
      t.column "tag_id", :integer        
    end
  end

  def self.down
    drop_table :taggings
    drop_table :tags
    remove_column :articles, :tag_list
  end
end
